<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <button @click="fn(1)">+1</button>
      <button @click="fn(10)">+10</button>
      <span>余额:{{ money }}</span>
    </div>
    <script src="../../vue.js"></script>

    <script>
      const vue = new Vue({
        el: "#app",
        data: {
          money: 100,
        },
        methods: {
          fn(count) {
            this.money += count;
          },
        },
      });
    </script>
  </body>
</html>
